home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1998 October A / Pcwk10a98.iso / Lotus / LOTUS / SMASTERS / APPROACH / SCHEDULE.MPR / SCRIPT / ApproachDoc / Room Setup.s (.txt) < prev    next >
Encoding:
Null Bytes Alternating  |  1997-01-09  |  3.1 KB  |  46 lines

  1. '++LotusScript Development Environment:2:5:(Options):0:66
  2.  
  3. '++LotusScript Development Environment:2:5:(Forward):0:1
  4. Declare Sub Switchto(Source As Form, View As VIEW)
  5.  
  6. '++LotusScript Development Environment:2:5:(Declarations):0:2
  7.  
  8. '++LotusScript Development Environment:2:2:BindEvents:1:129
  9. Private Sub BindEvents(Byval Objectname_ As String)
  10.     Static Source As FORM
  11.     Set Source = Bind(Objectname_)
  12.     On Event Switchto From Source Call Switchto
  13. End Sub
  14.  
  15. '++LotusScript Development Environment:2:2:Switchto:1:12
  16. Sub Switchto(Source As Form, View As VIEW)
  17. ' Switchto event for the Room Setup view
  18. ' Retrieves the current list of rooms, populates the view with the
  19. ' room list, and sets up the boxes and buttons in the view.
  20. ' The view is set to appear as a dialog box.
  21.     
  22.     Dim checkValue As Integer        ' Stores the return value from
  23.                                         ' assigning a list to a list box
  24.     
  25.     ' Retrieve the current list of rooms from the rooms database.
  26.     Call fillRoomsArray()
  27.     
  28.     ' Fill an existing list box with the list of existing rooms
  29.     checkValue = source.body.lbxRooms.setlist(rooms)
  30.     
  31.     ' Set the list box so that none of the items in the list is selected.
  32.     source.body.lbxRooms.text = ""    
  33.     
  34.     ' Clear the field box of any leftover text
  35.     source.body.fbxRoomName.text = ""
  36.     
  37.     ' Set the Done, Add, and Remove buttons so that they are disabled
  38.     source.body.btnDone.enabled = False
  39.     source.body.btnAdd.enabled = False
  40.     source.body.btnRemove.enabled = False
  41.     
  42.     ' Clear the list of deleted rooms
  43.     Redim deletedRooms(0)
  44.     deletedRooms(0) = ""
  45.     
  46. End Sub        ' Switchto event for the Room Setup view